#ifndef IMAGEPROXY_H
#define IMAGEPROXY_H

#include "image/imagebase.h"
#include "text/pos2d.h"

/****************************************************
  Proxy of image.
 ****************************************************/
class ImageProxy
{
public:
    static const int TYPE_VECTOR = 0;
    static const int TYPE_PIXEL  = 1;

    ImageProxy();
    virtual ~ImageProxy();

    // Set the type ( TYPE_VECTOR / TYPE_PIXEL )
    void setType(int type){
        _type = type;
    }

    // Set the path of image
    void setPath(char * path){
        _path = path;
    }

    // Get the reference of image position
    Pos2d& pos(){
        return *_pos;
    }

    // Load image
    void loadImage();

private:
    int _type;
    char * _path;
    Pos2d * _pos;
    ImageBase * _image;
};

#endif // IMAGEPROXY_H
